.box {
    width: 800px;
    margin: 100px auto 0;
}
.box li {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    margin-left: 10px;
    text-align: center;
    background-color: #ccc;  
}
.btn {
    width: 50px;
    text-align: center;
    background-color: #ccc;
    visibility: hidden;
}
@media screen and (max-width:500px) {
    .box li {
        display: block;

        height: 30px;
        width: 50px;
        margin-left: 20px;
        
        line-height: 20px;
    }
   .box ul{
        height: 0;
        overflow: hidden;
        transition: height 1s;
    }
    .btn {
        visibility: visible;
        margin-left: 20px;
    }
    .btn:hover ~ul {
        height: 200px;
    }
}